package com.bw.produce.domain;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author lemon
 * @date 2024/11/12 21:22
 **/
public class Brand {
    /**id*/
    private Long id;

    /**品牌名称*/
    @NotBlank(message = "品牌名称不能为空")
    private String brandName;

    /**首字母*/
    @NotBlank(message = "首字母不能为空")
    @Pattern(regexp = "^[A-Z]$",message = "首字母只能是大写因为字母")
    private String firstChar;

    /**LOGO图片地址*/
    @NotBlank(message = "logo不能为空")
    private String brandLogo;

    /**品牌图片*/
    @NotBlank(message = "品牌图片不能为空")
    private String brandImage;

    /**创建故事*/
    @NotBlank(message = "品牌故事不能为空")
    private String brandHistory;

    /**排名*/
    @NotNull( message= "排名不能为空")
    @Min(value = 0,message = "排名最小为0")
    private Integer brandRank;

    /**是否显示  0否 1是*/
    @NotNull( message= "是否显示不能为空")
    private Boolean reveal;


    /**是否是制造商 0否 1是*/
    @NotNull( message= "是否是制造商不能为空")
    private Boolean manufacturer;



    @Override
    public String toString() {
        return "Brand{" +
                "id=" + id +
                ", brandName='" + brandName + '\'' +
                ", firstChar='" + firstChar + '\'' +
                ", brandLogo='" + brandLogo + '\'' +
                ", brandImage='" + brandImage + '\'' +
                ", brandHistory='" + brandHistory + '\'' +
                ", brandRank=" + brandRank +
                ", reveal=" + reveal +
                ", manufacturer=" + manufacturer +
                '}';
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getFirstChar() {
        return firstChar;
    }

    public void setFirstChar(String firstChar) {
        this.firstChar = firstChar;
    }

    public String getBrandLogo() {
        return brandLogo;
    }

    public void setBrandLogo(String brandLogo) {
        this.brandLogo = brandLogo;
    }

    public String getBrandImage() {
        return brandImage;
    }

    public void setBrandImage(String brandImage) {
        this.brandImage = brandImage;
    }

    public String getBrandHistory() {
        return brandHistory;
    }

    public void setBrandHistory(String brandHistory) {
        this.brandHistory = brandHistory;
    }

    public Integer getBrandRank() {
        return brandRank;
    }

    public void setBrandRank(Integer brandRank) {
        this.brandRank = brandRank;
    }

    public Boolean getReveal() {
        return reveal;
    }

    public void setReveal(Boolean reveal) {
        this.reveal = reveal;
    }

    public Boolean getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(Boolean manufacturer) {
        this.manufacturer = manufacturer;
    }

    public Brand() {
    }

    public Brand(Long id, @NotBlank(message = "参数名称不能为空") String brandName, @NotBlank(message = "参数名称不能为空") String firstChar, @NotBlank(message = "参数名称不能为空") String brandLogo, @NotBlank(message = "参数名称不能为空") String brandImage, @NotBlank(message = "参数名称不能为空") String brandHistory, @NotNull(message = "参数名称不能为空") Integer brandRank, @NotNull(message = "参数名称不能为空") Boolean reveal, @NotNull(message = "参数名称不能为空") Boolean manufacturer) {
        this.id = id;
        this.brandName = brandName;
        this.firstChar = firstChar;
        this.brandLogo = brandLogo;
        this.brandImage = brandImage;
        this.brandHistory = brandHistory;
        this.brandRank = brandRank;
        this.reveal = reveal;
        this.manufacturer = manufacturer;
    }
}
